﻿using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using GdNet.WebFramework.Data;

namespace GdNet.Integrations.Castle.Installers
{
    public class RepositoriesInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(
                Classes.FromAssemblyContaining<DataRepositories>()
                       .InNamespace(typeof(DataRepositories).Namespace, true)
                       .WithService.DefaultInterfaces()
                       .LifestyleTransient());
        }
    }
}
